#include "DetourPathQueue.h"
#ifdef __cplusplus
extern "C" {
#endif
void nav_dtPathQueue_Delete(dtPathQueue * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtPathQueue_DeleteArray(dtPathQueue * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtPathQueue * nav_NewdtPathQueue(){
	dtPathQueue* wrap_out = new dtPathQueue();
	return wrap_out;
}

dtNavMeshQuery const * nav_dtPathQueue_getNavQuery(dtPathQueue const * c_this){
	dtNavMeshQuery const * c_out = c_this->getNavQuery();
	dtNavMeshQuery const * wrap_out  = (dtNavMeshQuery const *)(void*)(c_out);
	return wrap_out;
}

dtStatus nav_dtPathQueue_getPathResult(dtPathQueue * c_this,dtPathQueueRef ref,dtPolyRef * path,int * pathSize,int const maxPath){
	dtPathQueueRef c_arg_ref=ref;
	dtPolyRef * c_arg_path=(dtPolyRef *)(void*)(path);
	int * c_arg_pathSize=(int *)(void*)(pathSize);
	int const c_arg_maxPath=maxPath;
	dtStatus c_out = c_this->getPathResult(c_arg_ref,c_arg_path,c_arg_pathSize,c_arg_maxPath);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

dtStatus nav_dtPathQueue_getRequestStatus(dtPathQueue const * c_this,dtPathQueueRef ref){
	dtPathQueueRef c_arg_ref=ref;
	dtStatus c_out = c_this->getRequestStatus(c_arg_ref);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

dtPathQueue * nav_dtPathQueue_IndexArray(dtPathQueue * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

bool nav_dtPathQueue_init(dtPathQueue * c_this,int const maxPathSize,int const maxSearchNodeCount,dtNavMesh * tmp_arg_nav){
	int const c_arg_maxPathSize=maxPathSize;
	int const c_arg_maxSearchNodeCount=maxSearchNodeCount;
	dtNavMesh * c_arg_tmp_arg_nav=(dtNavMesh *)(void*)(tmp_arg_nav);
	bool c_out = c_this->init(c_arg_maxPathSize,c_arg_maxSearchNodeCount,c_arg_tmp_arg_nav);
	bool wrap_out  = (c_out);
	return wrap_out;
}

dtPathQueueRef nav_dtPathQueue_request(dtPathQueue * c_this,dtPolyRef startRef,dtPolyRef endRef,float const * startPos,float const * endPos,dtQueryFilter const * filter){
	dtPolyRef c_arg_startRef=startRef;
	dtPolyRef c_arg_endRef=endRef;
	float const * c_arg_startPos=(float const *)(void*)(startPos);
	float const * c_arg_endPos=(float const *)(void*)(endPos);
	dtQueryFilter const * c_arg_filter=(dtQueryFilter const *)(void*)(filter);
	dtPathQueueRef c_out = c_this->request(c_arg_startRef,c_arg_endRef,c_arg_startPos,c_arg_endPos,c_arg_filter);
	dtPathQueueRef wrap_out  = (c_out);
	return wrap_out;
}

void nav_dtPathQueue_update(dtPathQueue * c_this,int const maxIters){
	int const c_arg_maxIters=maxIters;
	c_this->update(c_arg_maxIters);
}

dtPathQueue * nav_NewDtPathQueuePtrArray(long n){
	dtPathQueue* c_this=new dtPathQueue[n];
	return c_this;
}

#ifdef __cplusplus
}
#endif
